Crate to_and_fro

source ·

Attribute Macros§

  • Define the default case to expect for both parsing, or stringifying. Valid values are:
  • Defines the field to default to when parsing fails. Also generates a Default implimentation pointing to the default variant.
  • Define the case to expect when parsing a variant from a string. Valid values are:
  • Define the case to stringify to through Display, or Debug. Valid values are:
  • Rejects the variant from being parsed from a String. This either throws an Error on parse, or defaults to the variant specified with default.
  • Impliments serde::Serialize and serde::Deserialize for the enum.

Derive Macros§

  • Generate automatic implementations of FromStr, Display, Debug, and PartialEq for an enum.